/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sync.model;

import sync.model.Assignment.Status;

/**
 *
 * @author yarden
 */
public class AssignmentItem {
    
    private String id;
    private String name;
    private Assignment assignment;
    private String desc;
    private String filename;
    private String modified;
    private String completed;
    private Status status;
    private Status serverStatus;
    private String comment;

    
    public AssignmentItem(String id) {
        this.id = id;
        status = Assignment.Status.InProgress;
        serverStatus = status;
    }
    
    public String getId() {
        return id;
    }


    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public Assignment getAssignment() {
        return assignment;
    }
    
    public void setAssignment(Assignment assignment) {
        this.assignment = assignment;
    }
        

    public String getDesc() {
        return desc;
    }
    
    public void setDesc(String desc) {
        this.desc = desc;
    }
    
    public String getCompleted() {
        return completed;
    }
    
    public void setCompleted(String completed) {
        this.completed = completed;
    }

    public Status getStatus() {
        return status;
    }
    
    public void setStatus(Status status) {
        this.status = status;
    }
    
    public Status getServerStatus() {
        return this.serverStatus;
    }
    
    public void setServerStatus(Status status) {
        this.serverStatus = status;
    }

    public String getComment() {
        return comment;
    }
    
    public void setComment(String comment) {
        this.comment = comment;
    }
    
    public String getModified() {
        return modified;
    }
    
    public void setModified(String modified) {
        this.modified = modified;
    }
    
    public String getFilename() {
        return filename;
    } 
    
    public void setFilename(String filename) {
        this.filename = filename;
    }
    
    public boolean isDirty() {
        return status != serverStatus;
    }
 }
